Ricardo E Espinoza-Ibarra (espinoza@cs.ucdavis.edu) wrote:
> Does anyone know what the -O option in gcc C compiler does? I have tried to compile a program in two different ways: 1) cc -o first first.c, and it worksfine; 2) cc -o first first.c -O, and it runs faster than the other one. I checked to see if it had changed the program code in anyway, and it hadn't.
> This option stands for "optimizer", but I want to know how the heck it
optimizes the program! Please respond as soon as possible.